package end.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import end.bean.shiro.Resource;

/**
 * 
 * ResourceDAO.java 2016-7-14
 * 
 * Copyright zhaocj Inc. All rights reserved. Love Me Like Love Justin Bieber
 */
public interface ResourceDAO<T> extends BaseMapper<T> {
	public List<Resource> queryMenuResources();

	public Integer[] queryMenuRightsByManager(Object key);

	public List<Resource> queryFunctionResourcesByManagerId(
            @Param("id") Integer id);

	public List<Resource> queryFunctionByRoleId(@Param("id") Integer id);

	public List<Resource> queryFuncResourcesTree();

	public List<Resource> queryMenuResourcesTree();

	public Integer[] queryResourceRightsByRoleID(Object key);

	public boolean updateRightsResourceByRole(@Param("rights") Integer[] rights, @Param("roleID") Integer roleID);
}
